package com.zxp.snowy.test.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import com.baomidou.mybatisplus.annotation.*;
import vip.xiaonuo.core.pojo.base.entity.BaseEntity;
import cn.afterturn.easypoi.excel.annotation.Excel;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 测试表
 * </p>
 *
 * @author shollin
 * @since 2024-09-11
 */
@Getter
@Setter
@TableName("t_simple")
@Schema(name = "Simple", description = "测试表")
@EqualsAndHashCode(callSuper = true)
public class Simple extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @Schema(description = "id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @Schema(description = "姓名")
    @TableField("name")
    private String name;

    @Schema(description = "年龄")
    @TableField("age")
    private Integer age;

    @Schema(description = "删除标识1")
    @TableField("delete_flag")
    private Byte deleteFlag;

    @Schema(description = "删除标识2")
    @TableField("deleted")
    private Byte deleted;

    @Schema(description = "测试布尔类型")
    @TableField("is_ok")
    private Byte isOk;

    @Schema(description = "版本")
    @TableField("version")
    private Short version;

    @Schema(description = "创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    @Excel(name = "创建时间", databaseFormat = "yyyy-MM-dd HH:mm:ss", format = "yyyy-MM-dd", width = 20)
    private Date createTime;

    @Schema(description = "更新时间")
    @TableField(value = "update_time", fill = FieldFill.UPDATE)
    @Excel(name = "更新时间", databaseFormat = "yyyy-MM-dd HH:mm:ss", format = "yyyy-MM-dd", width = 20)
    private Date updateTime;
}
